package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("recite")
public class Recite {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long userId;
    private Integer authorId;
    private Integer totalCount;
    private Integer nowCount;

    public Recite(Long userId, Integer authorId, Integer totalCount, Integer nowCount) {
        this.userId = userId;
        this.authorId = authorId;
        this.totalCount = totalCount;
        this.nowCount = nowCount;
    }

    public Recite(Integer nowCount) {
        this.nowCount = nowCount;
    }
}
